#ifndef _GAME_CONTROLLER_H_
#define _GAME_CONTROLLER_H_

#include "cocos2d.h"
#include "backGround.h"
#include "myHero.h"
#include "obstaCles.h"

class gameController:public cocos2d::Ref
{
public:
	gameController(void);
	~gameController(void);

public:
	static gameController* create(cocos2d::Layer*,float);

	void createBlocks();

	virtual bool init(cocos2d::Layer*,float);

	virtual void ondate();

	bool hitTestPoint(cocos2d::Vec2);

	void onUserTouch();

private:
	cocos2d::Layer* layer;
	float positionY;

	int currentFrameIndex;
	int frameCount;

	backGround *edge;
	myHero* hero;
};

#endif//_GAME_CONTROLLER_H_


